<?php
/**
 * Created by JetBrains PhpStorm.
 * User: zhouyang
 * Date: 13-9-06
 * Time: 下午22:31
 * To change this template use File | Settings | File Templates.
 */
class AdTimesDB  extends DBReader{
    //获取对应推广的排期表
    public function getTimesByAdId($ad_id){
        $where = ' 1=1 and ad_id = '.$ad_id;
        $bindarr = array();

        $sql = 'select ad_time_id, ad_id, start_time, end_time from ad_times where '. $where .' order by ad_time_id desc';

        $ret = $this->db()->getAll($sql,$bindarr);

         return $ret;
    }
}